# https://blog.csdn.net/Y_morph/article/details/121893114
# 大佬写的文章，看不太懂
# 难点是 ja3指纹验证
# https://mp.weixin.qq.com/s/-i730kN_f5sIvh6kj7k5JQ

import requests

headers = {
    "User-Agent": "yuanrenxue.project",
    "Cookie": "sessionid=9atb57c5ci9jvxvqlo3c72eubcbm3w1y;",
}


def get_data(page):
    url = f'https://match.yuanrenxue.com/api/match/19?page={page}'
    return requests.get(url, headers=headers, verify=False).json()


def main():
    value_list = []
    for page in range(1, 6):
        res = get_data(page)
        print("res==>", res)
        value_list += [v['value'] for v in res['data']]
    print(value_list)
    print(sum(value_list))


if __name__ == '__main__':
    main()
